﻿using System;
using Brjnk.GpxExplorer.ViewModel;

namespace Brjnk.GpxExplorer.Workspace.BitmapExport
{
    public class RouteLabel : GeoObjectLabel
    {
        public RouteLabel(Page page, LabelStyle labelStyle, ArrowStyle arrowStyle, RouteLabelStyle routeLabelStyle, RouteVM route)
            : base(page, labelStyle, arrowStyle)
        {
            if ((object)routeLabelStyle == null) throw new ArgumentNullException("routeLabelStyle");
            this.RouteLabelStyle = routeLabelStyle;
            this.route = route;
            Init();
        }

        private RouteLabelStyle routeLabelStyle;

        public RouteLabelStyle RouteLabelStyle
        {
            get { return routeLabelStyle; }
            private set { routeLabelStyle = value; OnPropertyChanged("RouteLabelStyle"); }
        }

        private RouteVM route;

        public RouteVM Route
        {
            get { return route; }
        }

        public override object DataObject
        {
            get { return route; }
        }
    }
}